<?php

/**
 * Stock form.
 *
 * @package    administracion-ventas
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormTemplate.php 10377 2008-07-21 07:10:32Z dwhittle $
 */
class StockForm extends BaseStockForm
{
  public function configure()
  {
      $this->widgetSchema['cantidad']->setLabel('Cantidad a reponer');
      $this->widgetSchema['cantidad']->setAttributes(array('size' => '3', 'maxlength' => '3'));
  }

  public function updateObject($values = null)
  {
      $obj = parent::updateObject($values);
      $producto_id = sfContext::getInstance()->getRequest()->getParameter('producto_id');
      $obj->setProductoId($producto_id);

      return $obj;
  }
}
